<?php
include('../../../config/config.php');
include('../function/vieweditbiodata.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta charset="utf-8">
  <!-- Title and other stuffs -->
  <title>Database - SDM</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="author" content="">

<!-- Stylesheets -->
  <link href="../../../style/bootstrap.css" rel="stylesheet">
  <!-- Font awesome icon -->
  <link rel="stylesheet" href="../../../style/font-awesome.css"> 
  <!-- jQuery UI -->
  <link rel="stylesheet" href="../../../style/jquery-ui.css"> 
  <!-- Calendar -->
  <link rel="stylesheet" href="../../../style/fullcalendar.css">
  <!-- prettyPhoto -->
  <link rel="stylesheet" href="../../../style/prettyPhoto.css">   
  <!-- Star rating -->
  <link rel="stylesheet" href="../../../style/rateit.css">
  <!-- Date picker -->
  <link rel="stylesheet" href="../../../style/bootstrap-datetimepicker.min.css">
  <!-- jQuery Gritter -->
  <link rel="stylesheet" href="../../../style/jquery.gritter.css">
  <!-- CLEditor -->
  <link rel="stylesheet" href="../../../style/jquery.cleditor.css"> 
  <!-- Bootstrap toggle -->
  <link rel="stylesheet" href="../../../style/bootstrap-toggle-buttons.css">
  <!-- Main stylesheet -->
  <link href="../../../style/style.css" rel="stylesheet">
  <!-- Widgets stylesheet -->
  <link href="../../../style/widgets.css" rel="stylesheet">   
  <!-- Responsive style (from Bootstrap) -->
  <link href="../../../style/bootstrap-responsive.css" rel="stylesheet">

   
  <!-- HTML5 Support for IE -->
  <!--[if lt IE 9]>
  <script src="js/html5shim.js"></script>
  <![endif]-->

  <!-- Favicon -->
  <link rel="shortcut icon" href="../../..img/favicon/favicon.png">
</head>

<body>

<?php
include ("header.php");
?>

<!-- Main content starts -->

<div class="content">

  	<!-- Sidebar -->
    <div class="sidebar">
        <div class="sidebar-dropdown"><a href="#">Navigation</a></div>

        <div class="sidebar-inner">

          <!--- Sidebar navigation -->
          <!-- If the main navigation has sub navigation, then add the class "has_submenu" to "li" of main navigation. -->
          <ul class="navi">

            <!-- Use the class nred, ngreen, nblue, nlightblue, nviolet or norange to add background color. You need to use this in <li> tag. -->

            <li class="norange"><a href="index.php"><i class="icon-home"></i> Home</a></li>
            
            <li class="norange"><a href="lihatbiodatapegawai.php"><i class="icon-list"></i> Lihat Biodata Pegawai</a></li>

             <li class="has_submenu norange current open">
			<a href="index.php">
			<i class="icon-user"></i> Biodata Group Head<span class="pull-right"><i class="icon-angle-right"></i></span>
			</a>
			<ul>
			<li class="active"><a href="editbiodata.php"><i class="icon-edit"></i> Edit Biodata</a></li>

            <li class="norange"><a href="pendidikan.php"><i class="icon-th-large"></i> Pendidikan</a></li>

            <li class="norange"><a href="jabatan.php"><i class="icon-briefcase"></i> Jabatan</a></li>

            <li class="norange"><a href="training.php"><i class="icon-info-sign"></i> Training</a></li>
			</ul>
			</li>

            <li class="norange"><a href="performance.php"><i class="icon-bookmark"></i> Performance History</a></li>

          </ul>

          <!-- Search form -->
          <div class="sidebar-widget">
            <?php
			include ("search.php");
			?>
          </div>
		  
        </div>

    </div>    

    <!-- Sidebar ends -->

  	<!-- Main bar -->
  	<div class="mainbar">
      
	    <!-- Page heading -->
	    <div class="page-head">
        <!-- Page heading -->
	      <h2 class="pull-left">Edit Biodata 
          <!-- page meta -->
          <span class="page-meta">Silahkan mengedit biodata anda.</span>
        </h2>


        <!-- Breadcrumb -->
        <div class="bread-crumb pull-right">
          <a href="index.html"><i class="icon-home"></i> Home</a> 
          <!-- Divider -->
          <span class="divider">/</span> 
          <a href="#" class="bread-current">Edit Biodata</a>
        </div>

        <div class="clearfix"></div>

	    </div>
	    <!-- Page heading ends -->



	    <!-- Matter -->

	    <div class="matter">
        <div class="container-fluid">

          <div class="row-fluid">

            <div class="span12">


              <div class="widget worange">
                
                <div class="widget-head">
                  <div class="pull-left">Biodata</div>
                  <div class="widget-icons pull-right">
                    <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a> 
                    <a href="#" class="wclose"><i class="icon-remove"></i></a>
                  </div>
                  <div class="clearfix"></div>
                </div>

                <div class="widget-content">
                  <div class="padd">

                    <h6>Biodata Pegawai</h6>
                    <hr />
                    <!-- Form starts.  -->
                     <form class="form-horizontal" method="post" enctype="multipart/form-data" action="../function/updatebiodata.php">
                      <div class="control-group">
                        <label class="control-label" for="nip">NIP</label>
                        <div class="controls">
                          <input type="text" id="nip" name="nip" disabled value="<?php echo $temp['nip']; ?>">
                        </div>
                      </div>
                      <div class="control-group">
                        <label class="control-label" for="nama">Nama</label>
                        <div class="controls">
                          <input type="text" id="nama" name="nama" value="<?php echo $temp['nama']; ?>" placeholder="Nama Lengkap">
                        </div>
                      </div>
                      
					  <div class="control-group">
                        <label class="control-label" name="gender" for="gender">Gender</label>
                        <div class="controls">
                          <select name="gender" id="gender">
						 <?php
						 $query7 = mysql_query("SELECT GENDER from biodata where NIP =".$nip);
							while($row7 = mysql_fetch_assoc($query7)){
							$choose7 =  $row7['GENDER'];
							}
							?>					
                          <option  value='Pria' <?php if($choose7 === "Pria"){echo"selected='selected'";} ?>  > Pria </option>";
                          <option  value='Wanita' <?php if($choose7 === "Wanita"){echo"selected='selected'";} ?>  > Wanita </option>";
                          
						</select>
						  </div>
                      </div>
                      
					  <div class="control-group">
                        <label class="control-label" for="tempatlahir">Tempat Lahir</label>
                        <div class="controls">
                          <input type="text" id="pob" name="pob" value="<?php echo $temp['pob']; ?>" placeholder="Ex: Jakarta">
                        </div>
                      </div>
					  <div class="control-group">
                        <label class="control-label" for="tanggallahir">Tanggal Lahir</label>
                        <div class="controls">
                          <input type="date" id="dob" name="dob" data-date-format="dd-mm-yyyy" value="<?php echo $temp['dob']; ?>">
                        </div>
                      </div>
					  <div class="control-group">
                        <label class="control-label" for="tinggi">Tinggi Badan</label>
                        <div class="controls">
                          <input type="text" id="height" name="height" value="<?php echo $temp['height']; ?>" placeholder="Dalam cm">
                        </div>
                      </div>
					  <div class="control-group">
                        <label class="control-label" for="berat">Berat Badan</label>
                        <div class="controls">
                          <input type="text" id="weight" name="weight" value="<?php echo $temp['weight']; ?>" placeholder="Dalam kg">
                        </div>
                      </div>
                      <div class="control-group">
                        <label class="control-label" for="agama">Agama</label>
                      <div class='controls select-radio'>
                         <select name="agama">
						 <?php
						 $query6 = mysql_query("SELECT AGAMA from biodata where NIP =".$nip);
							while($row6 = mysql_fetch_assoc($query6)){
							$choose6 =  $row6['AGAMA'];
							}
							?>					
                          <option  value='Islam' <?php if($choose6 === "Islam"){echo"selected='selected'";} ?>  > Islam </option>";
                          <option  value='Kristen' <?php if($choose6 === "Kristen"){echo"selected='selected'";} ?>  > Kristen </option>";
                          <option  value='Katolik' <?php if($choose6 === "Katolik"){echo"selected='selected'";} ?>  > Katolik </option>";
                          <option  value='Hindu' <?php if($choose6 === "Hindu"){echo"selected='selected'";} ?>  > Hindu </option>";
                          <option  value='Budha' <?php if($choose6 === "Budha"){echo"selected='selected'";} ?>  > Budha </option>";
                        
						</select>
                        </div>
                        </div>
                        
                      <div class="control-group">
                        <label class="control-label" for="alamat">Alamat</label>
                        <div class="controls">
                          <textarea id="alamat" name="alamat"><?php echo $temp['alamat'];?></textarea>
                        </div>
                      </div>
					  <div class="control-group">
                        <label class="control-label" for="kota">Kota</label>
                        <div class="controls">
                          <input type="text" id="kota" name="kota" value="<?php echo $temp['kota']; ?>">
                        </div>
                      </div>
					  <div class="control-group">
                        <label class="control-label" for="telepon">Telepon</label>
                        <div class="controls">
                          <input type="text" id="telepon" name="telepon" value="<?php echo $temp['telepon']; ?>">
                        </div>
                      </div>
					  <div class="control-group">
                        <label class="control-label" for="handphone">Handphone</label>
                        <div class="controls">
                          <input type="text" id="handphone" name="handphone" value="<?php echo $temp['handphone']; ?>">
                        </div>
                      </div>
                      <div class="control-group">
                        <label class="control-label" for="status">Status</label>
                        <div class="controls">
                          <input type="text" disabled value="<?php echo $temp['status']; ?>" id="status" name="status">
                        </div>
                      </div>
					  <div class="control-group">
                        <label class="control-label" for="tanggalmasuk">Tanggal Masuk</label>
                        <div class="controls">
                          <input type="date" id="tanggal_masuk" name="tanggal_masuk" data-date-format="dd-mm-yyyy" value="<?php echo $temp['tanggal_masuk']; ?>">
                        </div>
                      </div>
					  <div class="control-group">
                        <label class="control-label" for="tanggaltetap">Tanggal Tetap</label>
                        <div class="controls">
                          <input type="date" id="tanggal_tetap" name="tanggal_tetap" data-date-format="dd-mm-yyyy" value="<?php echo $temp['tanggal_tetap']; ?>">
                        </div>
                        </div>
						
                        <div class="control-group">
                        <label class="control-label" for="password">Old Password</label>
                        <div class="controls">
                          <input type="password" value="<?php echo $temp['password']; ?>" id="password" name="password">
                        </div>
                      </div>
						<div class="control-group">
                        <label class="control-label" for="password">New Password</label>
                        <div class="controls">
                          <input type="password" id="newpassword" name="newpassword" value="<?php echo $temp['password']; ?>">
                        </div>
                      </div>
					  <div class="control-group">
                        <label class="control-label" for="foto">Foto</label>
                        <div class="controls">
                          <input class="file" type="file" name="nama_file" id="nama_file"  accept="image/png,image/jpeg,image/jpg,image/gif"><small>Max 10MB. jpg / jpeg / png / gif</small></input>
                        </div>
                      </div>
                                   
                      <hr />
                      <input type="submit" class="btn btn-primary" name="button" value="Save">
                      
                    </form>

                  </div>
                </div>
                  <div class="widget-foot">
                    <!-- Footer goes here -->
                  </div>
              </div>  

            </div>

          </div>

        </div>
		  </div>

		<!-- Matter ends -->

    </div>

   <!-- Mainbar ends -->	    	
   <div class="clearfix"></div>

</div>
<!-- Content ends -->



        <div class="slide-content">


            <!-- Tab content -->
            
            <div class="tab-content">

              <div class="tab-pane active" id="tab1">


            </div>

        </div>
      
    </div>

<!-- Notification box ends -->  

<!-- Scroll to top -->
<span class="totop"><a href="#"><i class="icon-chevron-up"></i></a></span> 

<!-- JS -->
<script src="../../../js/jquery.js"></script> <!-- jQuery -->
<script src="../../../js/bootstrap.js"></script> <!-- Bootstrap -->
<script src="../../../js/jquery-ui-1.10.2.custom.min.js"></script> <!-- jQuery UI -->
<script src="../../../js/fullcalendar.min.js"></script> <!-- Full Google Calendar - Calendar -->
<script src="../../../js/jquery.rateit.min.js"></script> <!-- RateIt - Star rating -->
<script src="../../../js/jquery.prettyPhoto.js"></script> <!-- prettyPhoto -->
<script src="../../../js/bootstrap-datepicker.js"></script>
<script>    $('#dp2').datepicker();
</script>

<!-- jQuery Flot -->
<script src="../../../js/excanvas.min.js"></script>
<script src="../../../js/jquery.flot.js"></script>
<script src="../../../js/jquery.flot.resize.js"></script>
<script src="../../../js/jquery.flot.pie.js"></script>
<script src="../../../js/jquery.flot.stack.js"></script>

<script src="../../../js/jquery.gritter.min.js"></script> <!-- jQuery Gritter -->
<script src="../../../js/sparklines.js"></script> <!-- Sparklines -->
<script src="../../../js/jquery.cleditor.min.js"></script> <!-- CLEditor -->
<script src="../../../js/bootstrap-datetimepicker.min.js"></script> <!-- Date picker -->
<script src="../../../js/jquery.toggle.buttons.js"></script> <!-- Bootstrap Toggle -->
<script src="../../../js/filter.js"></script> <!-- Filter for support page -->
<script src="../../../js/custom.js"></script> <!-- Custom codes -->
<script src="../../../js/charts.js"></script> <!-- Custom chart codes -->

</body>
</html>